<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="/css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">应用管理</div>
    <div class="main_soso">
    	
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="100%" style="border-left:none;text-align: left;font-weight: normal;"><span style="color:#229BC1;font-weight: bold;">应用基本信息</span> </th>
        </tr>
      </table>
    </div>
  </div>
  
  <div class="content_main">
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
	      <tbody>
	          <tr>
              <td width="15%" style="background:#F0F8FF;" align="right">应用ID：</td>
              <td width="25%">${app.appId}</td>
              <td width="15%" style="background:#F0F8FF;" align="right">应用名称：</td>
              <td>${app.appName}</td>
             </tr>
             <tr>
              <td width="15%" style="background:#F0F8FF;" align="right">应用publishId：</td>
              <td>${app.publicId}</td>
              <td width="15%" style="background:#F0F8FF;" align="right">开发者：</td>
              <td>${app.userName}</td>
             </tr>
             <tr>
              <td width="15%" style="background:#F0F8FF;" align="right">应用系统：</td>
              <td><app:code_name code="${app.appPlat}"></app:code_name></td>
              <td width="15%" style="background:#F0F8FF;" align="right">应用分类：</td>
              <td><app:code_name code="${app.appCate}"/></td>
             </tr>
             <tr>
              <td width="15%" style="background:#F0F8FF;" align="right">创建日期：</td>
              <td><fmt:formatDate value="${app.createDate}" pattern="yyyy-MM-dd"/></td>
              <td width="15%" style="background:#F0F8FF;" align="right">状态：</td>
              <td><app:basestus status="${app.status}" type="appstatus"></app:basestus> </td>
             </tr>
             <tr>
              <td width="15%" style="background:#F0F8FF;" align="right">积分汇率：</td>
              <td>${app.rate}</td>
              <td width="15%" style="background:#F0F8FF;" align="right">积分单位：</td>
              <td>${app.unit}</td>
             </tr>
             <tr>
              <td width="15%" style="background:#F0F8FF;" align="right">应用路径：</td>
              <td colspan="3"> <app:image src="${app.softPath}" type="doc"></app:image> </td>
             </tr>
             
         </tbody>
	    </table>
  </div>
  
  <div class="main_title" style="background:  #f4f4f4;">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="100%" style="border-left:none;text-align: left;font-weight: normal;"><span style="color:#229BC1;font-weight: bold;">应用操作</span> </th>
        </tr>
      </table>
   </div>
  <div class="content_main">
	    <form action="/app/update_app_state.shtml" name="form01" id="form01">
	    <input type="hidden" name="appId" value="${app.appId}" />
	    <input type="hidden" name="state" value="" id="state" />
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
	      <tbody>
	          <tr>
              <td width="15%" style="background:#F0F8FF;" align="right">状态：</td>
              <td colspan="3"><app:basestus status="${app.status}" type="appstatus"></app:basestus></td>
             </tr>
             <!-- 	  //0 新建 1：待审核 2:上线 3:禁止 4：删除 -->
             <tr>
              <td width="15%" style="background:#F0F8FF;" align="right">审核操作：</td>
              <td colspan="3">
                 <c:choose>
                    <c:when test="${app.status=='0'}">
                        <input type="button" value="删除" name="c" onclick="us('4','删除')" />
                    </c:when>
                    <c:when test="${app.status=='1'}">
                        <input type="button" value="上线" name="c" onclick="us('2','上线')"/>&nbsp;<input type="button" value="禁止" name="c" onclick="us('3','禁止')" />&nbsp;<input type="button" value="删除" name="c" onclick="us('4','删除')" />
                    </c:when>
                    <c:when test="${app.status=='2'}">
                        <input type="button" value="禁止" name="c" onclick="us('3','禁止')"/>&nbsp;<input type="button" value="删除" name="c" onclick="us('4','删除')"/>
                    </c:when>
                    <c:when test="${app.status=='3'}">
                        <input type="button" value="上线" name="c" onclick="us('2','上线')"/>&nbsp;<input type="button" value="删除" name="c" onclick="us('4','删除')" />
                    </c:when>
                 </c:choose>
              </td>
             </tr>
         </tbody>
	    </table>
	    </form>
  </div>
  
  
  
  
</div>
</body>
</html>
<script  src="/scripts/util.js" type="text/javascript"></script>
<script type="text/javascript" src="/scripts/calendar.js"></script>
<script type="text/javascript">
    function us(s,n){
	   	 if(confirm('确定进行 ['+n+'] 操作?')){
	   		 util.$('state').value=s;
	   		 util.$('form01').submit();
	   	 }
    }
</script>
